package com.wqiuqiu.common.excption;


import com.sun.org.apache.bcel.internal.classfile.Code;

/**
 * 10 通用
 * 11 商品
 * 12 订单
 * 13 购物车
 * 14 物流
 * 15 会员
 * 21 库存
 */
public enum  BizCodeEnume {

    UNKNOW_EXCEPTION(10000,"系统未知错误"),
    VAILD_EXCEPTION(10001,"参数格式校验失败"),
    Feign_EXCEPTION(10002,"feign调用异常"),
    CODE_NOFALSE_EXCEPTION(10003,"验证码不正确"),
    CODE_OUT_TIME_EXCEPTION(10004,"验证码过期"),
    TOO_MANY_REQUSET_EXCEPTION(10005,"请求频繁"),
    KILL_SERVICE_EXCEPTION(10005,"秒杀服务正忙"),
    Feign_TIMEOUT_EXCEPTION(10006,"feign调用超时"),
    EMAIL_EXCEPTION(10007,"eamil请求频率过快"),
    PRODUCR_UP_EXCEPTION(11000,"商品上架异常"),
    USER_REGISTER_EXCEPTION(15001,"用户注册异常"),
    USER_PASSWORD_EXCEPTION(15002,"用户密码错误"),
    USER_NAME_EXCEPTION(15003,"用户名不存在"),
    WARE_NOT_ENOUGH_EXCEPTION(21000,"库存不足");


    private int code;
    private String message;
    BizCodeEnume(int code, String message){
        this.code = code;
        this.message = message;
    }
    public int getCode(){
        return this.code;
    }
    public String getMessage(){
        return this.message;
    }
}
